define(['text!service/chages2.html','../service/data/appliancesList'],
	function(viewTemplate, Appliances) {
		return Piece.View.extend({
			id: 'service_chages2',
			events:{
				"click .list-st li" : "list"
			},
			render: function() {
				$(this.el).html(viewTemplate);
				Piece.View.prototype.render.call(this);
				return this;
			},
			onShow: function() {
				var windowHeight = $(window).height();
				var elTop = $("#changes2").offset().top;
				var elHeight = windowHeight - elTop ;

				console.info(elHeight);
				$("#changes2").css({
					"height": elHeight
				});
				new iScroll($("#changes2")[0]);
				this.TempviewlateRender(Appliances);
			},
			//模板页面渲染
			TempviewlateRender: function(data) {

				var listTemplateWiki = _.template($("#change2Temp").html(), {
					"rows": data.rows
				});

				$("#change2List").append(listTemplateWiki);


				// new iScroll($("#standards"));
			},
			list: function(){
				this.container.navigateForResult('/service/chagesList',{
					trigger:true
				},'service/chages2', this.onGotResult);
			}
		}); //view define

	});